package icu.lookyousmileface.netty.simple;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

/**
 * @author shenj
 * @title: Unpooled01
 * @projectName NettyPro
 * @date 2020/12/7 9:58
 */
public class Unpooled01 {
    public static void main(String[] args) {

        ByteBuf dataBuf = Unpooled.buffer(5);
        for (int i = 0; i < dataBuf.capacity(); i++) {
            dataBuf.writeByte(i);
        }
        for (int i = 0; i <dataBuf.capacity() ; i++) {
            System.out.println(dataBuf.readByte());
        }

    }
}
